package c_ch11.kruskal;

public class WeightedEdge_try implements Comparable<WeightedEdge_try>{
	
	private int a, b, weight;

	public WeightedEdge_try(int a, int b, int weight) {
		super();
		this.a = a;
		this.b = b;
		this.weight = weight;
	}

	public final int getA() {
		return a;
	}

	public final int getB() {
		return b;
	}

	public final int getWeight() {
		return weight;
	}

	@Override
	public String toString() {
		return "[" + a + "—" + b + ": " + weight + "]";
	}
	
	public static void main(String[] args) {
		System.out.println(new WeightedEdge_try(2, 2, 2));
	}

	@Override
	public int compareTo(WeightedEdge_try anotherEdge) {
		return this.weight - anotherEdge.weight;
	}
}
